/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package paypal;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author root
 */
@WebService()
public class PayPalWS {

    /**
     * Web service operation
     */
    int Money = 5000;
    @WebMethod(operationName = "payment")
    public Boolean payment(@WebParam(name = "ProductPrice")
    int ProductPrice) {
        //TODO write your implementation code here:

        if( Money >= ProductPrice)
        {
            Money = Money - ProductPrice;
            return true;
       
        } 
        else
        {
            return false;
        }
    }
}
